<!--
 @description 门店信息
 @fileName ItemView.vue
 @author zengqiongying
 @created 2023/04/28 14:36:41
-->
<template>
  <div>
    <Cell :modelValue="modelValue.code" title="门店编码" readonly default-value="--" />
    <Cell :modelValue="modelValue.name" title="门店名称" readonly default-value="--" />
    <Cell :modelValue="shopCityName" title="所在省市区" custom readonly default-value="--" />

    <Cell title="门店类型" custom readonly :modelValue="modelValue.shopClassifyName" default-value="--" />
    <Cell :modelValue="modelValue.shopAddr" title="详细地址" custom readonly default-value="--" />
    <Cell :modelValue="modelValue.cityLevelName" title="城市级别" readonly default-value="--" />
    <Cell :modelValue="modelValue.marketLevelName" title="市场层级" readonly default-value="--" />
  </div>
</template>

<script>
  import { defineComponent, computed } from 'vue'
  import Cell from '@/components/Cell/index.vue'
  export default defineComponent({
    name: 'DealerCustomerShopsItemView',
    components: { Cell },
    props: {
      modelValue: {
        type: Object,
        default: () => {}
      }
    },
    setup(props) {
      const shopCityName = computed(() => {
        const { provinceName, cityName, countyName, townName } = props.modelValue
        return `${provinceName || ''}${cityName || ''}${countyName || ''}${townName || ''}`
      })
      return {
        shopCityName
      }
    }
  })
</script>
<style lang="less" scoped></style>
